import request from '@/utils/request'
// 查询id
export function getStockid(id) {
    return request({
      url: '/finance/kltStock/'+id,
      method: 'get'
    })
  }
  // 查询list
export function getStockList(query) {
  return request({
    url: '/finance/kltStock/list',
    method: 'get',
    params: query
  })
}
// 查询所有数据
export function getAllStock(query) {
  return request({
    url: '/finance/kltStock/selectAll',
    method: 'get',
    params: query
  })
}

// 新增
export function getStockInsert(data) {
  return request({
    url: '/finance/kltStock',
    method: 'post',
    data: data
  })
}

// 修改
export function getStockEdit(data) {
  return request({
    url: '/finance/kltStock',
    method: 'put',
    data: data
  })
}


// 删除
export function getStockDelete(data) {
  return request({
    url: '/finance/kltStock?idList='+data,
    method: 'delete',
    
  })
}


// list计数
export function getStockCount(data) {
  return request({
    url: '/finance/kltStock/count',
    method: 'get',
    params:data
  })
}



// list计数
export function getStockPurchase(data) {
  return request({
    url: '/finance/kltStock/getStockByOrderIdAndDetail',
    method: 'get',
    params:data
  })
}


export function getStockPurchaseArrive(data) {
  return request({
    url: '/finance/kltStock/getStockByOrderIdAndDetailArrive',
    method: 'get',
    params:data
  })
}
export function DeductInventoryShippingRecords(data) {
  return request({
    url: '/finance/kltStock/DeductInventoryShippingRecords',
    method: 'get',
    params:data
  })
}
export function UndeductInventoryShippingRecords(data) {
  return request({
    url: '/finance/kltStock/UndeductInventoryShippingRecords',
    method: 'get',
    params:data
  })
}


